Overview
Base Pools can be created permissionlessly by any users, similar to uniswap v3 pools. Base pools are contain the main logic for borrowing actions as well as accepted collateral assets. To understand the differences between Base and Super Pools please visit core concepts
Creating a Base Lending Pool
The Base Pool contract is a singleton contract, meaning all assets of all base pools are stored in a single contract. Pools are data structures that contain accounting and market parameter logic.
Initializing a new Pool
function initializePool(
address owner,
address asset,
uint128 poolCap,
bytes32 rateModelKey
) external returns (uint256 poolId)
Parameters | type | Description |
---|---|---|
owner | address | Pool owner |
asset | address | Pool asset to lend |
poolCap | uint | Pool asset cap |
rateModelKey | bytes32 | Registry key for interest rate model |
Some assumptions to consider when making a pool:
- the
riskEngine
has to recognize an oracle for theasset
of the base Pool. Oracles can only be set by admins - the
rateModel
can only chosen from a list of known rate models within the registry contracts - Base Pools have 2 fees
originationFee
is a fee on every borrow, which goes to the protocolinterestFee
is a performance fee which is a percent of interest earned from borrowers